package Alarms;

import EventPackage.*;

public class FireAlarmMonitor extends AlarmMonitor {
	public FireAlarmMonitor(String name, int Xpos, int Ypos, int mwHeight, int mwWidthString, String[] args, int subSystemHaltEnvId) {
		super(name, Xpos, Ypos, mwHeight, mwWidthString, args, subSystemHaltEnvId);
	}
	
	public void turnOnSprinkler(){
		Event evt = new Event( 13, "SP1" );
		try {
			em.SendEvent( evt );
		} catch (Exception e) {
			System.out.println("Error sending halt message:: " + e);
		}
	}
	
	public void turnOffSprinkler(){
		Event evt = new Event( 13, "SP0" );
		try {
			em.SendEvent( evt );
		} catch (Exception e) {
			System.out.println("Error sending halt message:: " + e);
		}
	}
}